import request from '@/utils/request'

// 获取售货机商品销量
export const salesDetail = ({ innerCode, start, end }) => {
  return request.get(`/api/order-service/report/skuCollect/${innerCode}/${start}/${end}`)
}

// 获取一定时间范围之内的订单总数
export const orderList = (obj) => {
  return request.get('/api/order-service/report/orderCount', {
    params: obj
  })
}

// 获取一定时间范围之内的收入
export const salesAmount = (obj) => {
  return request.get('/api/order-service/report/orderAmount', {
    params: obj
  })
}

// 获取售货机补货次数
export const getSupply = ({ innerCode, start, end }) => {
  return request.get(`/api/task-service/task/supplyCount/${innerCode}/${start}/${end}`)
}

// 获取售货机维修次数
export const getRepair = ({ innerCode, start, end }) => {
  return request.get(`/api/task-service/task/repairCount/${innerCode}/${start}/${end}`)
}
